Technical Q&A

SND18 - Synchronous SysBeep (05-October-1999)


Q: With Sound Manager 3.1 the system beep, SysBeep, became asynchronous. For my particular application I need to wait until the SysBeep is done playing the sound before I want to continue. How do I get the functionality of the old synchronous SysBeep?

A: The answer to getting a synchronous SysBeep is very simple, and doesn’t involve you trying to figure out how long to wait. Just ask the Sound Manager to play SysBeep synchronously and it will.

OSErr MakeSysBeepSynchronous (SInt16 *oldState) {
    OSErr        err;
         
    SndGetSysBeepState (oldState);
    err = SndSetSysBeepState (sysBeepEnable | sysBeepSynchronous);
         
    return err;
}


-- Mark Cookson
Worldwide Developer Technical Support

Technical Q&As | Contents
Previous Question | Next Question

To contact us, please use the Contact Us page.